function toCamelCase(txt) {
  var regExp = /[-]\w/gi
  console.log(txt.match(regExp))
  if (txt.match(regExp)) {
    let s = txt.split("-").map((w) => w.toLowerCase().replace(/( |^)[a-z]/g,(L)=>L.toUpperCase())).join("")
    console.log(s);
    
  }
}

toCamelCase("user-Action")
